package it.edgeworks.dsession.impl.dummy;

import it.edgeworks.dsession.api.HttpSessionProvider;

import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;

/**
 * @author Daniele Galdi
 * @version $Revision: 64 $
 */
public class HttpSessionProviderImpl implements HttpSessionProvider {

    private boolean first;

    public void init(FilterConfig config) throws ServletException {
        first = true;
    }

    public boolean loadSession(String sessionId, HttpSession session) {
        return !first;
    }

    public void saveSession(String sessionId, HttpSession session) {
        first = false;
    }

    public void destroy() {
    }
}
